<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script src="/cdn-cgi/apps/head/3cOPSgo5Omz84ycX7CvigfX4cpw.js"></script><script async src="https://www.googletagmanager.com/gtag/js?id=UA-82213539-2"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());

        gtag('config', 'UA-82213539-2');
    </script>
    <title>${title.encodeAsHtml()} ${version}</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" href="${resourcesPath}/css/main.css" type="text/css" media="screen, print" title="Style" charset="utf-8"/>
    <link rel="stylesheet" href="${resourcesPath}/css/pdf.css" type="text/css" media="print" title="PDF" charset="utf-8"/>
    <script type="text/javascript">
function addJsClass(el) {
    var classes = document.body.className.split(" ");
    classes.push("js");
    document.body.className = classes.join(" ");
}
    </script>
    <style>
        .contribute-btn {
            bottom: 0px;
        }
    </style>
</head>

<body class="body" onload="addJsClass();">

<div id="navigation">
    <div class="navTitle">
        <% if (logo) { %>
        <span id="logo">${logo}</span>
        <% } %>
        ${docTitle.encodeAsHtml()}
    </div>

    <div class="navLinks">
        <ul>
            <li>
                <div id="nav-summary" onmouseover="toggleNavSummary(false)" onmouseout="toggleNavSummary(true)">
                    <a href="${path}/guide/index.html" class="button">Table of contents</a>

                    <div id="nav-summary-childs">
                        <% toc.children.eachWithIndex { ch, i -> %>
                        <div class="toc-item" style="margin-left:0"><a href="${path}/guide/${ch.name.encodeAsUrlPath().encodeAsHtml()}.html"><strong>${i + 1}</strong><span>${ch.title.encodeAsHtml()}</span></a>
                        </div>
                        <% } %>
                    </div>
                </div>
            </li>
            <li class="separator selected">
                <a id="ref-button" onclick="localToggle(); return false;" href="#">Quick Reference</a>
            </li>
        </ul>
    </div>
</div>


<table id="colset" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td id="col1">
            <div id="main" class="reference corner-all">

                <span id='toggle-col1' class="toggle">(<a href="#" onclick="localToggle(); return false;">Quick Reference</a>)</span>
                <% if(sourceRepo) { %>
                <div class='contribute-btn'>
                    <button type='button' class='btn btn-default' onclick='window.location.href="${sourceRepo}/${sourcePath}"'>
                        <i class='fa fa-pencil-square-o'></i> Improve this doc
                    </button>
                </div>
                <% } %>

                ${content}
            </div>
        </td>
        <td id="col2">
            <div class="local clearfix">
                <div class="local-title">
                    <a href="${path}/guide/index.html" target="mainFrame">Quick Reference</a>
                    <span class="toggle">(<a href="#" onclick="localToggle(); return false;">hide</a>)</span>
                </div>
                <div class="menu">
                    <% for (cat in refMenu) { %>
                    <div class="menu-block">
                        <h1 class="menu-title" onclick="toggleRef(nextElement(this))">${cat.name.encodeAsHtml()}</h1>
                        <div class="menu-sub${ cat.name == section ? ' selected' : ''}">
                            <% if (cat.usage.exists()) { %>
                            <div class="menu-item"><a href="${path}/ref/${cat.name.encodeAsUrlPath().encodeAsHtml()}/Usage.html">Usage</a></div>
                            <% } %>
                            <% for (txt in cat.sections) { %>
                            <div class="menu-item"><a href="${path}/ref/${cat.name.encodeAsUrlPath().encodeAsHtml()}/${txt.name[0..-6].encodeAsUrlPath().encodeAsHtml()}.html">${txt.name[0..-6].encodeAsHtml()}</a>
                            </div>
                            <% } %>
                        </div>
                    </div>
                    <% } %>
                </div>
            </div>
        </td>
    </tr>
</table>

<div id="footer">
    ${copyright}
    ${footer}
</div>


<script type="text/javascript" src="${resourcesPath}/js/docs.js"></script>

</body>
</html>
